import Mock from './mock.angular';
// 技术交底
Mock.mock('/api/v1/safeActivity/disclosure/add', 'post', {
  success: true,
  message: '',
  code: 200,
});

Mock.mock('/api/v1/safeActivity/disclosure/delete', 'post', {
  success: true,
  message: '',
  code: 200,
});

Mock.mock('/api/v1/safeActivity/disclosure/update', 'post', {
  success: true,
  message: '',
  code: 200,
});

// 培训
Mock.mock('/api/v1/safeActivity/training/add', 'post', {
  success: true,
  message: '',
  code: 200,
});

Mock.mock('/api/v1/safeActivity/training/delete', 'post', {
  success: true,
  message: '',
  code: 200,
});

Mock.mock('/api/v1/safeActivity/training/update', 'post', {
  success: true,
  message: '',
  code: 200,
});

// 会议
Mock.mock('/api/v1/safeActivity/meeting/add', 'post', {
  success: true,
  message: '',
  code: 200,
});

Mock.mock('/api/v1/safeActivity/meeting/delete', 'post', {
  success: true,
  message: '',
  code: 200,
});

Mock.mock('/api/v1/safeActivity/meeting/update', 'post', {
  success: true,
  message: '',
  code: 200,
});

Mock.mock('/api/v1/safeActivity/todos/query', 'post', (({ data }) => {
  const respData = {
    success: true,
    message: '',
    code: 200,
    page: data.page,
    total() {
      return this.rows.length;
    },
    'rows|40': [
      {
        id: '@id',
        name: '@cname',
        code: '@id',
        compere: '@word',
        'type|1': [1, 2, 3],
        'status|1': [1, 2, 3],
        startTime: '@date',
        joinDepartment: '@word',
      },
    ],
  };
  return Mock.mock(respData);
}));

Mock.mock('/api/v1/safeActivity/disclosure/query', 'post', (({ data }) => {
  const respData = {
    success: true,
    message: '',
    code: 200,
    page: data.page,
    total() {
      return this.rows.length;
    },
    'rows|25': [
      {
        id: '@id',
        name: '@cname',
        code: '@id',
        compere: '@word',
        'type|1': [1, 2, 3],
        'status|1': [1, 2, 3],
        startTime: '@date',
        joinDepartment: '@word',
      },
    ],
  };
  return Mock.mock(respData);
}));
